package Work02;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
//  new Movie("《肖生克的救赎》" , 9.7 ,  "罗宾斯")
//          *       new Movie("《霸王别姬》" , 9.6 ,  "张国荣、张丰毅")
//          *       new Movie("《阿甘正传》" , 9.5 ,  "汤姆.汉克斯")
public class Test {
    public static void main(String[] args) {
        Collection<Movie> collections=new ArrayList<>();
        Movie m1=new Movie("《肖生克的救赎》",9.7,"罗宾斯");
        Movie m2=new Movie("《霸王别只因》",9.6,"坤坤、癌坤");
        Movie m3=new Movie("《阿甘正传》",9.5,"汤姆.汉克斯");//设置属性
        collections.add(m1); collections.add(m2); collections.add(m3);//存存存
        for (Movie s:collections){//狠狠的遍历
            System.out.println(s);//狠狠的输出
        }
    }
}
